<?php global $options; foreach ($options as $value) {if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }}?>


<div class="postlist_container">
<table id="pl_<?php echo $pl_category; ?>" cellpadding="0" cellspacing="0">
  <thead>
  <tr>
    <th class="nosort">Image</th>
    <th>Title</th>
    <th>Date</th>
    <th>Author</th>
	<th>Responses</th>
  </tr>
  </thead>

		<?php $temp_query = clone $wp_query; ?>
		<?php query_posts('category_name=' . $pl_category . '&showposts=' . $pl_count . ''); ?>
	 
			 <?php while (have_posts()) : the_post(); if (current_user_can('level_2')) {} else {if (in_category('private')) continue;}
			 if ($images = get_children(array(
				'post_parent' => $post->ID,
				'numberposts' => '1',
				'post_type' => 'attachment',
				'post_mime_type' => 'image',
				'order' => 'ASC',
				'orderby' => 'menu_order')))  
			 foreach($images as $image) {  
				$exehill_image = $image->guid; 
				$exehill_thumb = wp_get_attachment_thumb_url( $image->ID);			
				} else {
				$exehill_image = site_url('/wp-content/themes/exehill2/images/mini_noimage.png');
				$exehill_thumb = site_url('/wp-content/themes/exehill2/images/mini_noimage.png');}				
			?>	


		<tr><td><img src="<?php echo $exehill_thumb; ?>" alt="<?php the_title(); ?>" style="width:25px; height:25px; " border="0"/></td><td> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></td><td><?php the_time('F jS, Y'); ?></td><td><?php the_author(); ?></td><td><?php comments_popup_link('0 Responses', '1 Responses', '% Responses'); ?></td></tr>

		
		
<?php endwhile; ?>
<?php $wp_query = clone $temp_query; ?>

			</table>

<script type="text/javascript">
window.addEvent( 'domready', function(){
  new SortingTable( 'pl_<?php echo $pl_category; ?>' );
});
</script>
</div><div class="vid_bottominfo"><a href="<?php bloginfo('home'); ?>/category/<?php echo $pl_category; ?>/"><?php if ($exehill_cat_link) { echo $exehill_cat_link; } else { ?>View all posts in <?php echo $pl_category; ?><?php } ?></a></div>
